<?php
$return_arr =array();

	foreach($result as $key => $obj)	
	{
			$row_array['itemCode'] 		    = utf8_encode($obj->getArticuloId());
			$row_array['itemDesc'] 		    = utf8_encode($obj->getDescripcion());
			$row_array['itemPrice']      	= $obj->getCostoProm();
			$row_array['undMedida']      	= $obj->getUoM();
			
			array_push( $return_arr, $row_array );    
    }

	/* Free connection resources. */
	
	/* Toss back results as json encoded array. */
	echo json_encode($return_arr);